package com.chencs.common.user.service;

import com.chencs.vo.common.user.UserModel;
import com.chencs.webmvc.rest.RestFullTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by chencs on 2017/6/7.
 */
@Service
public class UserService {

    private static final Logger logger = LoggerFactory.getLogger(UserService.class);

    @Autowired
    RestFullTemplate restTemplate;
    /**标志远程服务url**/
    private static final String URLPATH = "service-common/user/";

    public String login(UserModel model) throws Exception{
        String ret = restTemplate.postForObject(URLPATH + "login", String.class,model);
        logger.info("userService login zuulGateWay result {}", ret);
        return ret;
    }



}
